package com.qys.livesMall.anchor.mapper;

import com.qys.livesMall.anchor.model.entity.AnchorLivesRoom;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 主播直播间表 Mapper 接口
 * </p>
 *
 * @author wzy
 * @since 2023-06-26
 */
public interface AnchorLivesRoomMapper extends BaseMapper<AnchorLivesRoom> {
   /**
    * 查询当前时间有直播场次的直播间
    * @param livesList
    * @return
    */
   List<AnchorLivesRoom> getOnLiveRoom(List<Long> livesList);

    /**
     * 记录用户观看直播
     * @param userId
     */
    void recordView(Long userId);

    /**
     * 查询用户总计观看时长
     * @param userId
     * @return
     */
    int selectUserViewTime(Long userId);
}
